#include "Succubus.h"
#include "../../data/GameInfo.h"

Succubus::Succubus()
{
    skillList = {SkillId::SKILL_RASENGAN, SkillId::SKILL_PURPLE_ENERGY,
                 SkillId::SKILL_CHIDORI, SkillId::SKILL_RASENSHURIKEN, SkillId::SKILL_WHIRL_WIND};
    GameAnimation::InitFrameData(GameInfo::Instance().texturePool[TexId::TEX_SUCCUBUS_ATTACK],
                                 animAttack, 4, 4, false);
    GameAnimation::InitFrameData(GameInfo::Instance().texturePool[TexId::TEX_SUCCUBUS_CHANT],
                                 animChant, 4, 2, false, [this] { isChant = false; }, 0.5);
    GameAnimation::InitFrameData(GameInfo::Instance().texturePool[TexId::TEX_SUCCUBUS_DIE],
                                 animDie, 4, 9, false, [this] { OnDie(); }, 0.05);
    GameAnimation::InitFrameData(GameInfo::Instance().texturePool[TexId::TEX_SUCCUBUS_RELEASE],
                                 animRelease, 4, 4, false, [this] { isRelease = false; }, 0.1);
    GameAnimation::InitFrameData(GameInfo::Instance().texturePool[TexId::TEX_SUCCUBUS_STANDBY],
                                 animStandBy, 4, 4);
    GameAnimation::InitFrameData(GameInfo::Instance().texturePool[TexId::TEX_SUCCUBUS_WALK],
                                 animWalk, 4, 4);

    for (int i = 0; i < Facing::SIZE; i++) {
        animRigidity[i].Copy(animDie[i]);
        animRigidity[i].rectSrcList = {animDie[i].rectSrcList[0]};
        animRigidity[i].timer.waitTime = 1;
        animRigidity[i].onFinished = [this] { OnRigidity(); };
    }

    attackMix = GameInfo::Instance().mixPool[MixId::MIX_SUCCUBUS_ATTACK];
}

